<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>{$head[title]}</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta content="{$head[keywords]}" name="keywords" />
<meta content="{$head[description]}" name="description" />
<base href="{SITE_URL}" />
<link href="favicon.ico" rel="shortcut icon" />
<link href="skin/style.css" rel="stylesheet" type="text/css" />
<link rel="alternate" type="application/rss+xml" title="{$head[title]}" href="/rss.php?rssid={$catid}" />
<script language="JavaScript" src="misc/config.js"></script>
<script language="JavaScript" src="misc/jquery.min.js"></script>
<script language="JavaScript" src="misc/common.js"></script>
<script language="JavaScript" src="misc/validator.js"></script>
</head>
<body>

{template 'header.html'}

<div class="container">
	
    <div class="main">
 
   
        <div class="mod">
        	<ul class="nav nav-tabs">
                <li {if !$orderby}class="active"{/if}><a href="?module=blog">最近更新</a></li>
                <li {if $orderby=='hits'}class="active"{/if}><a href="?module=blog&orderby=hits">最多点击</a></li>
                <!--<li><a href="?module=blog&orderby=supports" {if $orderby=='hits'}class="selected"{/if}>最多推荐</a></li>
                <li><a href="?module=blog&orderby=comments" {if $orderby=='hits'}class="selected"{/if}>最多评论</a></li>-->
            </ul>
            <div class="clear"></div>
             <div class="body">
             
                
                
                <div class="blog-list">
                	
                    
                    {loop $infos $n $r}
                   <div class="blog-item">
                   
                        <div class="blog-aside">
                            <a href="{url("?module=space&userid=$r[userid]")}" title="{$r[username]}"><img class="thumbnail" src="{thumb(avatar($r[userid]),48,48)}" alt="{$r[username]}"  target="_blank" width="48" height="48"/></a>
                        </div>
                        
                        <div class="blog-main">
                            <div class="blog-title">
                            <a href="{url($r[url])}" target="{$target}">{str_cut($r[title], 300)}</a>
                            </div>
                            <div class="blog-desc">
                            {$r[description]}
                            </div>
                            
                            <div class="blog-tool">
                            	{if $r[copyfrom]}<br/>来源：<a href="{$r[copyfrom]}">{$r[copyfrom]}</a>{/if}  {date('Y-m-d',$r[updatetime])}
                                <i class="icon-bookmark"></i><a href="?module=collect&action=add&mod={$module}&field={$module}id&value={$r[blogid]}">添加收藏</a>
                            </div>
                        </div>
                     </div>
                     {/loop}
                     
                </div>
                
                  
            
                <div class="pagination">
                    {$pages}
                </div>
             </div>
        </div>
        
        
            

    </div>
    
    <div class="aside">
    
    	<div class="mod">
            <div class="body">
                <a href="{url("?module=$module&action=create")}" class="button button-block button-primary">发表博客</a>
            </div>
        </div>
    
        
        <div class="mod">
            <div class="head">最新博客</div>
            <ul class="body">
              <!--{get sql="select title,url,inputtime from table_blog order by blogid desc" rows="10"}-->
                <li>({date('m-d',$r[inputtime])})&nbsp;<a href="{url($r[url])}">{$r[title]}</a></li>
              <!--{/get}-->
          </ul>
        </div>
        
        
        <div class="mod">
            <div class="head">热门博客</div>
            <ul class="body">
              <!--{get sql="select title,url,hits from table_blog order by hits desc" rows="10"}-->
                <li>({$r[hits]})&nbsp;<a href="{url($r[url])}">{$r[title]}</a></li>
              <!--{/get}-->
          </ul>
        </div>
        
       
        
          
    </div>
</div>


{template 'footer.html'}

